Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: GetDocumentByUNID - no error, no document?
Feedback Type: Problem
Product Area: Notes Client
Technical Area: Application Development
Platform: Windows
Release: 8.5.2
Reproducible: Always

I am using GetDocumentByUNID to retrieve a document in a database. Somehow this function is returning Nothing. My understanding from the help is that it should return a NotesDocument or an error. I have verified that the UNID being used is the correct one. Below is the relevent code, which is running in a script library.

resUnid = letterDoc.ResearchRequestID(0)
If researchDoc Is Nothing Then
Set researchDoc = session.CurrentDatabase.Getdocumentbyunid(resUnid)
If researchDoc Is Nothing Then
MsgBox "Unable to find research request for this letter (" & s.CurrentDatabase.Title & " -- " & resUnid & ")",0,"Programming error."
End
End If
End If

Somehow the msgbox in the above code is firing. I would have thought that to be impossible. Can anyone see what I am missing?


Feedback number WEBB955VCR created by ~Mark Nonjipysterings on 02/21/2013

Status: Open
Comments:

GetDocumentByUNID - no error, no do... (~Mark Nonjipyst... 21.Feb.13)
. . On Error Resume Next (~Fred Xanjumima... 21.Feb.13)
. . . . good point, but... (~Mark Nonjipyst... 22.Feb.13)
. . . . . . could be finding a deletion stub...... (~Justin Chugero... 22.Feb.13)
. . NotesView GetDocumentByKey doesn't ... (~Mark Nonjipyst... 22.Feb.13)
. . solution - declare notesdocument lo... (~Mark Nonjipyst... 25.Feb.13)
. . . . Not quite as you are thinking, but ... (~Fred Asatumibu... 25.Feb.13)
. . . . . . Well, shucks (~Mark Nonjipyst... 25.Feb.13)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS